Optimal. Leaf size=72 \[ -\frac{d \left (a+b \log \left (c x^n\right )\right )^2}{x}-\frac{2 b d n \left (a+b \log \left (c x^n\right )\right )}{x}+\frac{e \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}-\frac{2 b^2 d n^2}{x} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.116678, antiderivative size = 72, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.238, Rules used = {2353, 2305, 2304, 2302, 30} \[ -\frac{d \left (a+b \log \left (c x^n\right )\right )^2}{x}-\frac{2 b d n \left (a+b \log \left (c x^n\right )\right )}{x}+\frac{e \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}-\frac{2 b^2 d n^2}{x} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2353
Rule 2305
Rule 2304
Rule 2302
Rule 30
Rubi steps
\begin{align*} \int \frac{(d+e x) \left (a+b \log \left (c x^n\right )\right )^2}{x^2} \, dx &=\int \left (\frac{d \left (a+b \log \left (c x^n\right )\right )^2}{x^2}+\frac{e \left (a+b \log \left (c x^n\right )\right )^2}{x}\right ) \, dx\\ &=d \int \frac{\left (a+b \log \left (c x^n\right )\right )^2}{x^2} \, dx+e \int \frac{\left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx\\ &=-\frac{d \left (a+b \log \left (c x^n\right )\right )^2}{x}+\frac{e \operatorname{Subst}\left (\int x^2 \, dx,x,a+b \log \left (c x^n\right )\right )}{b n}+(2 b d n) \int \frac{a+b \log \left (c x^n\right )}{x^2} \, dx\\ &=-\frac{2 b^2 d n^2}{x}-\frac{2 b d n \left (a+b \log \left (c x^n\right )\right )}{x}-\frac{d \left (a+b \log \left (c x^n\right )\right )^2}{x}+\frac{e \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}\\ \end{align*}
Mathematica [A] time = 0.0349871, size = 63, normalized size = 0.88 \[ -\frac{d \left (a+b \log \left (c x^n\right )\right )^2}{x}-\frac{2 b d n \left (a+b \log \left (c x^n\right )+b n\right )}{x}+\frac{e \left (a+b \log \left (c x^n\right )\right )^3}{3 b n} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 0.258, size = 1544, normalized size = 21.4 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.12538, size = 154, normalized size = 2.14 \begin{align*} \frac{b^{2} e \log \left (c x^{n}\right )^{3}}{3 \, n} - 2 \, b^{2} d{\left (\frac{n^{2}}{x} + \frac{n \log \left (c x^{n}\right )}{x}\right )} + \frac{a b e \log \left (c x^{n}\right )^{2}}{n} - \frac{b^{2} d \log \left (c x^{n}\right )^{2}}{x} + a^{2} e \log \left (x\right ) - \frac{2 \, a b d n}{x} - \frac{2 \, a b d \log \left (c x^{n}\right )}{x} - \frac{a^{2} d}{x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.04042, size = 360, normalized size = 5. \begin{align*} \frac{b^{2} e n^{2} x \log \left (x\right )^{3} - 6 \, b^{2} d n^{2} - 3 \, b^{2} d \log \left (c\right )^{2} - 6 \, a b d n - 3 \, a^{2} d + 3 \,{\left (b^{2} e n x \log \left (c\right ) - b^{2} d n^{2} + a b e n x\right )} \log \left (x\right )^{2} - 6 \,{\left (b^{2} d n + a b d\right )} \log \left (c\right ) + 3 \,{\left (b^{2} e x \log \left (c\right )^{2} - 2 \, b^{2} d n^{2} - 2 \, a b d n + a^{2} e x - 2 \,{\left (b^{2} d n - a b e x\right )} \log \left (c\right )\right )} \log \left (x\right )}{3 \, x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 8.28364, size = 182, normalized size = 2.53 \begin{align*} - \frac{a^{2} d}{x} + a^{2} e \log{\left (x \right )} - \frac{2 a b d n}{x} - \frac{2 a b d \log{\left (c x^{n} \right )}}{x} - 2 a b e \left (\begin{cases} - \log{\left (c \right )} \log{\left (x \right )} & \text{for}\: n = 0 \\- \frac{\log{\left (c x^{n} \right )}^{2}}{2 n} & \text{otherwise} \end{cases}\right ) - \frac{b^{2} d n^{2} \log{\left (x \right )}^{2}}{x} - \frac{2 b^{2} d n^{2} \log{\left (x \right )}}{x} - \frac{2 b^{2} d n^{2}}{x} - \frac{2 b^{2} d n \log{\left (c \right )} \log{\left (x \right )}}{x} - \frac{2 b^{2} d n \log{\left (c \right )}}{x} - \frac{b^{2} d \log{\left (c \right )}^{2}}{x} - b^{2} e \left (\begin{cases} - \log{\left (c \right )}^{2} \log{\left (x \right )} & \text{for}\: n = 0 \\- \frac{\log{\left (c x^{n} \right )}^{3}}{3 n} & \text{otherwise} \end{cases}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.20569, size = 232, normalized size = 3.22 \begin{align*} \frac{b^{2} n^{2} x e \log \left (x\right )^{3} + 3 \, b^{2} n x e \log \left (c\right ) \log \left (x\right )^{2} + 3 \, b^{2} x e \log \left (c\right )^{2} \log \left (x\right ) - 3 \, b^{2} d n^{2} \log \left (x\right )^{2} + 3 \, a b n x e \log \left (x\right )^{2} - 6 \, b^{2} d n^{2} \log \left (x\right ) - 6 \, b^{2} d n \log \left (c\right ) \log \left (x\right ) + 6 \, a b x e \log \left (c\right ) \log \left (x\right ) - 6 \, b^{2} d n^{2} - 6 \, b^{2} d n \log \left (c\right ) - 3 \, b^{2} d \log \left (c\right )^{2} - 6 \, a b d n \log \left (x\right ) + 3 \, a^{2} x e \log \left (x\right ) - 6 \, a b d n - 6 \, a b d \log \left (c\right ) - 3 \, a^{2} d}{3 \, x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]